#pragma once

#include "DiolObject.h"

namespace Diol
{

/*
	Button

	The Button object represent a simple on/off button on a joystick.
*/
class Button : public Object
{
public:
	Button( const ObjectInstance& objectInstance, Device* parentDevice );

	bool				isPressed() const { return mIsPressed; }
	
	virtual std::string	toString() const;
	virtual void		updateFrom( const DIDEVICEOBJECTDATA& entry );

protected:
	void				setPressed( bool isPressed );

private:
	bool				mIsPressed;
};

}
